<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
<script>
  function Father(uname,age){
    this.uname=uname
    this.age=age
  }
  Father.prototype.money=function(){
    console.log('一个亿');
  }
  function Son(uname,age){
    Father.call(this,uname,age)
  }
  Son.prototype=new Father()
  Son.prototype.constructor=Son
  Son.prototype.exam=function(){
    console.log('一百分');
  }
  const son=new Son('ldg',18)
  const father=new Father('ldd',45)
  console.log(son);
  son.money()
  son.exam()
  father.exam()
</script>
</body>
</html>